// 引入全局组件
import SvgIcon from './SvgIcon.vue'
import Category from './Category.vue'
// 引入图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const allGloablComponent = { SvgIcon,Category }

export default {
  install(app) {
    // 注册全部的全局组件
    Object.keys(allGloablComponent).forEach((key) => {
      app.component(key, allGloablComponent[key])
    })
    // icon 图标注册全局组件
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
